export default function(data){
  const [xList,data1,data2,data3] = [[],[],[],[]]
  data.map(({path,txnum,gjnum,zbnum},i)=>{
    xList.push(`${i+1}-${path}`)
    data1.push(txnum)
    data2.push(gjnum)
    data3.push(zbnum)
  })
  return {
    tooltip: {
      trigger: 'axis',
      axisPointer: {
        type: 'shadow'
      }
    },
    legend: {},
    grid: {
      left: '3%',
      right: '4%',
      bottom: '3%',
      containLabel: true
    },
    xAxis: [
      {
        type: 'category',
        data: xList,
        axisLabel: {
          fontSize: 12,
          color: '#000',
          rotate:40, // 文本旋转角度
        },

      }
    ],
    yAxis: [
      {
        type: 'value'
      }
    ],
    dataZoom: [
      {
        type: 'inside'
      }
    ],
    series: [
      {
        name: '通行车辆',
        type: 'bar',
        stack: 'total',
        label: {
          show: true
        },
        emphasis: {
          focus: 'series'
        },
        data: data1,
      },
      {
        name: '过检车辆',
        type: 'bar',
        stack: 'total',
        label: {
          show: true
        },
        emphasis: {
          focus: 'series'
        },
        data: data2,
      },
      {
        name: '中标车辆',
        type: 'bar',
        stack: 'total',
        label: {
          show: true
        },
        emphasis: {
          focus: 'series'
        },
        data: data3,
      }
    ]
  }
}